import {fromJS} from 'immutable'
import * as actionTypes from "./actionTypes";

const defaultState = fromJS({
    loginFlag: false
})


export default (state = defaultState, action) => {
    switch (action.type) {
        case actionTypes.CHANGE_LOGIN:
            return state.set('loginFlag', action.data)
        case actionTypes.CHANGE_LOGOUT:
            return state.set('loginFlag', action.data)
        default:
            return state
    }
}